SMPLX_DIR = '/gfs/project/humans/SMPLX/models'
mm = 1000.
FOCAL_LENGTH = 500.  # Reduce by 10 for making sure that people moving are in a visible bbox
IMG_SIZE = 224.  # Following SPIN setup
BBOX_FACTOR = 1.4
SPIN_BBOX_FACTOR = 1.2

FOCAL_LENGTH_SPIN, IMG_RES_SPIN = 5000., 224.
NUM_JOINTS_SMPLH = 1 + 21 + 30
NUM_JOINTS_SMPL = 1 + 21

MB = 1024.0 * 1024.0




action2id = {
    "walk": 0,
    "stand": 1,
    "hand movements": 2,
    "turn": 3,
    "interact with/use object": 4,
    "arm movements": 5,
    "t pose": 6,
    "step": 7,
    "backwards movement": 8,
    "raising body part": 9,
    "look": 10,
    "touch object": 11,
    "leg movements": 12,
    "forward movement": 13,
    "circular movement": 14,
    "stretch": 15,
    "jump": 16,
    "touching body part": 17,
    "sit": 18,
    "place something": 19,
    "take/pick something up": 20,
    "run": 21,
    "bend": 22,
    "throw": 23,
    "foot movements": 24,
    "a pose": 25,
    "stand up": 26,
    "lowering body part": 27,
    "sideways movement": 28,
    "move up/down incline": 29,
    "action with ball": 30,
    "kick": 31,
    "gesture": 32,
    "head movements": 33,
    "jog": 34,
    "grasp object": 35,
    "waist movements": 36,
    "lift something": 37,
    "knee movement": 38,
    "wave": 39,
    "move something": 40,
    "swing body part": 41,
    "catch": 42,
    "dance": 43,
    "lean": 44,
    "greet": 45,
    "poses": 46,
    "touching face": 47,
    "sports move": 48,
    "exercise/training": 49,
    "clean something": 50,
    "punch": 51,
    "squat": 52,
    "scratch": 53,
    "hop": 54,
    "play sport": 55,
    "stumble": 56,
    "crossing limbs": 57,
    "perform": 58,
    "martial art": 59,  # last BABEL_60 action
    "balance": 60,
    "kneel": 61,
    "shake": 62,
    "grab body part": 63,
    "clap": 64,
    "crouch": 65,
    "spin": 66,
    "upper body movements": 67,
    "knock": 68,
    "adjust": 69,
    "crawl": 70,
    "twist": 71,
    "move back to original position": 72,
    "bow": 73,
    "hit": 74,
    "touch ground": 75,
    "shoulder movements": 76,
    "telephone call": 77,
    "grab person": 78,
    "play instrument": 79,
    "tap": 80,
    "spread": 81,
    "skip": 82,
    "rolling movement": 83,
    "jump rope": 84,
    "play catch": 85,
    "drink": 86,
    "evade": 87,
    "support": 88,
    "point": 89,
    "side to side movement": 90,
    "stop": 91,
    "protect": 92,
    "wrist movements": 93,
    "stances": 94,
    "wait": 95,
    "shuffle": 96,
    "lunge": 97,
    "communicate (vocalise)": 98,
    "jumping jacks": 99,
    "rub": 100,
    "dribble": 101,
    "swim": 102,
    "sneak": 103,
    "to lower a body part": 104,
    "misc. abstract action": 105,
    "mix": 106,
    "limp": 107,
    "sway": 108,
    "slide": 109,
    "cartwheel": 110,
    "press something": 111,
    "shrug": 112,
    "open something": 113,
    "leap": 114,
    "trip": 115,
    "golf": 116,
    "move misc. body part": 117,
    "get injured": 118,
    "sudden movement": 119,  # last BABEL_60 action
    "duck": 120,
    "flap": 121,
    "salute": 122,
    "stagger": 123,
    "draw": 124,
    "tie": 125,
    "eat": 126,
    "style hair": 127,
    "relax": 128,
    "pray": 129,
    "flip": 130,
    "shivering": 131,
    "interact with rope": 132,
    "march": 133,
    "zombie": 134,
    "check": 135,
    "wiggle": 136,
    "bump": 137,
    "give something": 138,
    "yoga": 139,
    "mime": 140,
    "wobble": 141,
    "release": 142,
    "wash": 143,
    "stroke": 144,
    "rocking movement": 145,
    "swipe": 146,
    "strafe": 147,
    "hang": 148,
    "flail arms": 149
}
id2action = {v: k for k, v in action2id.items()}
